import request from '@/utils/request.js'
/* 获取部门列表信息 */
export const getDepartments = () => {
	return request({
		url: '/company/department',
		method: 'get'
	})
}
/* 新增部门 */
export const addDepartments = (data) => {
	return request({
		url: `/company/department`,
		method: 'post',
		data
	})
}
/* 根据ID查询部门 */
export const getDepartmentsById = (id) => {
	return request({
		url: `/company/department/${id}`,
		method: 'get'
	})
}
/* 根据ID删除部门 */
export const removeDepartmentsById = (id) => {
	return request({
		url: `/company/department/${id}`,
		method: 'delete'
	})
}

/* 根据ID修改部门 */
export const updateDepartmentsById = (id, data) => {
	return request({
		url: `/company/department/${id}`,
		method: 'put',
		data
	})
}

